﻿namespace Common
{
    public class ConstParameters
    {

        public const string MainCompanyName = "武汉谦通";


        /// <summary>
        /// WCF communication  Port 85
        /// </summary>
        public const int WcfPort = 9592;

        /// <summary>
        /// AcceptServer TcpListen Port
        /// </summary>
        public const int AstPort = 8592;


        /// <summary>
        /// Message Head Length(+First and Last identification+Check bit) 
        /// </summary>
        public const int MhLenth = 19;

        /// <summary>
        /// Message body Start Index
        /// </summary>
        public const int MBodySatrtIndex = 17;


        /// <summary>
        /// Max TaxiInfo In One Message (Must less than 23)
        /// </summary>
        public const int MaxTaxiInfoInOneMessage = 10;



        /// <summary>
        /// How long Time to Clear  out of date  Taxi  Cache. Unit : second
        /// </summary>
        public const int ClearTaxiCacheTime = 10 * 60; //second

        /// <summary>
        /// 0
        /// </summary>
        public const int TypeTaxi = 0;
        /// <summary>
        /// 1
        /// </summary>
        public const int TypePhoneUser = 1;
        /// <summary>
        /// 2
        /// </summary>
        public const int TypeTaxiDispatchClient = 2;



        #region Command  Code

        //-----------------car
        public const ushort CmdTaxiLogin = 0x0001;
        public const ushort CmdTaxiLoginReply = 0x8001;
         
        public const ushort CmdTaxiUpdataGpsInfo = 0x0002;
      
        public const ushort CmdTaxiCheckCard = 0x0003;
        public const ushort CmdTaxiCheckCardReply = 0x8003;

        public const ushort CmdTaxiChangeCardPassword = 0x0004;
        public const ushort CmdTaxiChangeCardPasswordReply = 0x8004;


        public const ushort CmdTaxiRequstOrderInfo = 0x0005;
        public const ushort CmdTaxiSendOrderInfo = 0x8005;

        public const ushort CmdTaxiAcceptOrder = 0x0006;
        public const ushort CmdTaxiAcceptOrderReply = 0x8006;

        public const ushort CmdTaxiSendAnOrderInfo = 0x8007;

        //-----------------phoneUser
      
        public const ushort CmdPhoneUserRegistRequest = 0x0101;
        public const ushort CmdPhoneUserRegistRequestReply = 0x8101;

        public const ushort CmdPhoneUserVerifyRegistCode = 0x0102;
        public const ushort CmdPhoneUserVerifyRegistCodeReply = 0x8102;

        public const ushort CmdPhoneUserLogin = 0x0103;
        public const ushort CmdPhoneUserLoginReply = 0x8103;

        public const ushort CmdPhoneUserSubmitOrder = 0x0104;
        public const ushort CmdPhoneUserSubmitOrderReply = 0x8104;

        public const ushort CmdPhoneUserSendOrderInfo = 0x8105;

        public const ushort CmdPhoneUserAcceptOrder = 0x0106;
        public const ushort CmdPhoneUserAcceptOrderReply = 0x8106;

        public const ushort CmdPhoneUserCancleOrder = 0x0107;
        public const ushort CmdPhoneUserCancleOrderReply = 0x8107;

        public const ushort CmdPhoneUserPaidAnOrder = 0x0108;
        public const ushort CmdPhoneUserPaidAnOrderReply = 0x8108;

        public const ushort CmdPhoneUserUpdateInfo = 0x0109;
        public const ushort CmdPhoneUserUpdateInfoReply = 0x8109;

        #endregion


    }
}
